angular.module('popModule', ['ionic'])
	.controller('popCtrl', function($scope,pop,$state) {
		$scope.router=$state.params;
		pop.getHomeData()
			.then(function(data) {
				$scope.topImg=data.data.data.banner
				$scope.listImg=data.data.data.suitList
//				console.log($scope.listImg)
			})
	})
	.factory('pop', function($http,$state) {
		var getHomeData = function() {
			return $http.get("/icy/m.php?fromPageId=0&pageSize=20&page=1&method=suit.getListByCard&page=1",{
				params:{
					cardId:$state.params.cardId
				}
			})
				.then(function(data) {
					return data;
				});
		};

		return {
			getHomeData: getHomeData
		};
	})
	